home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: July 24, 1998
- // Author: ms
- //
- // Description:
- // The doFilletBlendArgList() procedure executes one fillet blend
- // operation on the selected objects.
- //
-
-
- proc string pieceTogetherBlendCmd( string $version, string $args[] )
- //
- // Description :
- // Put together an blend Cmd. Note that there is enough curves by now.
- //
- {
- string $cmd = "";
- int $need = 9;
- if( "1" == $version ) {
- warning( "Using obsolete version of blend." );
- $cmd = "blend ";
- $cmd = $cmd + " -ch " + $args[0];
- $cmd = $cmd + " -cfr " + $args[1];
- $cmd = $cmd + " -ad " + $args[2];
- $cmd = $cmd + " -fl " + $args[3];
- $cmd = $cmd + " -fr " + $args[4];
- $cmd = $cmd + " -mk " + $args[5];
- $cmd = $cmd + " -pt " + $args[6];
- $cmd = $cmd + " -tt " + $args[7];
- $cmd = $cmd + " -po " + $args[8];
- }
- else {
- $cmd = "blend2 ";
- $cmd = $cmd + " -ch " + $args[0];
- $cmd = $cmd + " -cfr " + $args[1];
- $cmd = $cmd + " -an " + $args[2];
- $cmd = $cmd + " -fln " + $args[3];
- $cmd = $cmd + " -frn " + $args[4];
- $cmd = $cmd + " -mk " + $args[5];
- $cmd = $cmd + " -pt " + $args[6];
- $cmd = $cmd + " -tt " + $args[7];
- $cmd = $cmd + " -po " + $args[8];
-
- $cmd = $cmd + " -aa " + $args[9];
-
- $cmd = $cmd + " -la " + $args[10];
- $cmd = $cmd + " -ls " + $args[11];
- $cmd = $cmd + " -le " + $args[12];
- $cmd = $cmd + " -rvl " + $args[13];
-
- $cmd = $cmd + " -ra " + $args[14];
- $cmd = $cmd + " -rs " + $args[15];
- $cmd = $cmd + " -re " + $args[16];
- $cmd = $cmd + " -rvr " + $args[17];
- }
-
- return $cmd ;
- }
-
- global proc doFilletBlendArgList( string $version, string $args[] )
-
- //
- // Description :
- // Proc to do one blend depending on number
- // of valid selection items.
- //
- {
- //---------------------------------------------
- // Get the list of nurbs curves in select list.
- //---------------------------------------------
- //
- global int $gSelectIsoparmsBit;
- global int $gSelectCurvesOnSurfacesBit;
- global int $gSelectSurfaceEdgeBit;
-
- string $curveList[] = `filterExpand -ex true -sm $gSelectIsoparmsBit -sm $gSelectCurvesOnSurfacesBit -sm $gSelectSurfaceEdgeBit`;
-
- int $curveCount = size($curveList);
- if( $curveCount < 2 ) {
- error( "Must select at least two surface curves to do fillet blend." );
- }
- else {
- string $cmd = pieceTogetherBlendCmd( $version, $args );
- string $results[] = evalEcho( $cmd );
- if( 0 == size($results) ) {
- error( "Fillet blend failed on selected objects." );
- }
- else {
- select -r $results;
- }
- }
- }
-